<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <!-- 加载部部样式及META信息 -->
    <title>管理员</title>
    <div th:replace="common/meta"></div>
    <script>
        require.config.jsname = "backend/company/index";
        require.config.modulename = "admin"
        require.config.controllername = "auth.admin"
        require.config.actionname = "admin"
        require.config.moduleurl = "/admin/add"
    </script>
</head>
<body class="inside-header inside-aside is-dialog">
<div id="main" role="main">
    <div class="tab-content tab-addtabs">
        <div id="content">
            <div class="row">
                <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                    <div class="content">
                        <form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator"
                              method="POST" action="/sys/company/save">
                            <input type="hidden" name="id" th:value="${company.id}">
                            <div class="form-group">
                                <label for="name"
                                       class="control-label col-xs-12 col-sm-2">名称:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input type="text" class="form-control" id="name" name="name"
                                           th:value="${company.name}"
                                           data-rule="required"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="c-image" class="control-label col-xs-12 col-sm-2">图片:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <div class="form-inline">
                                        <input id="c-image" th:value="${company.avatar}" data-rule="required" class="form-control" size="50" name="avatar" type="text" value="">
                                        <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> 上传</button></span>
                                        <ul class="row list-inline plupload-preview" id="p-image"></ul>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="phone"
                                       class="control-label col-xs-12 col-sm-2">手机:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input type="text" class="form-control" id="phone" name="phone"
                                           th:value="${company.phone}"
                                           data-rule="required"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="person"
                                       class="control-label col-xs-12 col-sm-2">联系人:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input type="text" class="form-control" id="person" name="person"
                                           th:value="${company.person}"
                                           data-rule="required"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="addr"
                                       class="control-label col-xs-12 col-sm-2">地址:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input type="text" class="form-control" id="addr" name="addr"
                                           th:value="${company.addr}"
                                           data-rule="required"/>
                                </div>
                            </div>


                            <div class="form-group">
                                <label for="info"
                                       class="control-label col-xs-12 col-sm-2">介绍:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input type="text" class="form-control" id="info" name="info" th:value="${company.info}"
                                           data-rule="required"/>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="c-images" class="control-label col-xs-12 col-sm-2">图片组:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <div class="form-inline">
                                        <input id="c-images" data-rule="required" class="form-control" th:value="${company.imgs}"
                                               size="50" name="imgs" type="text"
                                               value="">
                                        <span><button type="button" id="c-attachfile" class="btn btn-danger plupload"
                                                      data-input-id="c-images"
                                                      data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true"
                                                      data-preview-id="p-images"><i class="fa fa-upload"></i> 上传</button></span>
                                        <ul class="row list-inline plupload-preview" id="p-images"></ul>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group hidden layer-footer">
                                <label class="control-label col-xs-12 col-sm-2"></label>
                                <div class="col-xs-12 col-sm-8">
                                    <button type="submit" class="btn btn-success btn-embossed disabled">确定</button>
                                    <button type="reset" class="btn btn-default btn-embossed">重置</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:replace="common/script"></div>
</body>
